Well-balanced mortars for ShallowWaterMultiLayerEquations2D#102
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #102 +/- ##
==========================================
- Coverage 99.19% 99.17% -0.02%
==========================================
Files 73 77 +4
Lines 3459 3635 +176
==========================================
+ Hits 3431 3605 +174
- Misses 28 30 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
patrickersing
left a comment
There was a problem hiding this comment.
It is very nice that you were able to extend this strategy to the MLSWE (with a single layer for now) so easily and that this version requires much less fixes to remain stable / well-balanced in the wet/dry region.
I have a few questions about desingularization & thresholds and added some suggestions to simplify the syntax in the elixirs.
examples/p4est_2d_dgsem/elixir_shallowwater_multilayer_monai_flood_amr.jl
Show resolved
Hide resolved
examples/p4est_2d_dgsem/elixir_shallowwater_multilayer_monai_flood_amr.jl
Outdated
Show resolved
Hide resolved
examples/p4est_2d_dgsem/elixir_shallowwater_multilayer_monai_flood_amr.jl
Outdated
Show resolved
Hide resolved
examples/p4est_2d_dgsem/elixir_shallowwater_multilayer_monai_flood_amr.jl
Outdated
Show resolved
Hide resolved
examples/p4est_2d_dgsem/elixir_shallowwater_multilayer_monai_flood_amr.jl
Outdated
Show resolved
Hide resolved
src/solvers/dgsem_p4est/dg_2d.jl
Outdated
| # Note, no desingularization or water height cutoff is needed here as these steps are done | ||
| # later in the hydrostatic reconstruction and stage limiter, respectively. |
There was a problem hiding this comment.
The hydrostatic reconstruction only sets the velocity to zero for dry states, but does not apply the desingularization procedure, so it could still be helpful do apply the desingularization step here.
Did you observe any difference with/without the desingularization step?
There was a problem hiding this comment.
Not that I can recall, the WB with wet/dry works the same in either case. I can try the stress test with AMR again to see if there is any benefit to the conservation loss. I never tried it with the desingularized mortars for the Monai or three mound test cases.
There was a problem hiding this comment.
After more experimentation I have expanded the comment above this computation to explain the strategy of neither using the max cutoff a la Benov et al. nor the desingularization. Done in f0384fb
Co-authored-by: Patrick Ersing <114223904+patrickersing@users.noreply.github.com>
…nt state of affairs
|
I cannot work out why the formatting check is failing. I ran the |
But the issue is with |
Whoops, my bad. I saw "monai" and assumed it was the new elixir! I will fix this. |
patrickersing
left a comment
There was a problem hiding this comment.
LGTM! I would say the small coverage drop is okay, since there is no easy way to create a unit test for the new error exception.
ae36086
into
trixi-framework:main
This PR adds a specialized
prolong2mortars!function to project the solution at the mortars while maintaining well-balancedness for theShallowWaterMultiLayerEquations2D. The remaining computation and backprojection of the mortar fluxes uses the standard mortar approach from Trixi viacalc_mortar_fluxes!andmortar_fluxes_to_elements!. Also, because of the reformulation done in the multilayer equation, the originalP4estMortarContainerscan be used.The strategy in this PR is much simpler because the multilayer equations "peel off" the pressure contribution and put it into the nonconservative term for easier well-balancing via hydrostatic reconstruction. So there is no need to carry the unprojected parent solution on the mortars as was necessary in #45. The approach herein is also much less sensitive to the
threshold_desingularization.In testing this new feature it is actually the case that for fully wet flows (or regions of the domain) the standard mortar approach for
prolong2mortars!remains well-balanced as well. This solves the conservation issues encountered in #45 .